#include <iostream>

using namespace std;

class Complex {
  public:
    Complex(double a, double b = 0) : real(a), imag(b) {}
    void Show() { cout << real << ' ' << '+' << ' ' << 'i' << imag << endl; }
    Complex operator+(Complex &a) {
        Complex b(0, 0);
        b.real = this->real + a.real;
        b.imag = this->imag + a.imag;
        return b;
    }

  private:
    double real;
    double imag;
};

int main() {
    Complex a(1), b(1, 2);
    Complex c(2);
    c = a + b;
    c.Show();
    return 0;
}
